/*
 * @Description:
 * @FilePath: \rs_wms_pc\src\api\inOutStock\outStockDetailOrder.js
 */
import request from '@/utils/request'

// 查询出库单明细列表
export function listOrder(query) {
  return request({
    url: '/inOutStock/outStockDetailOrder/list',
    method: 'get',
    params: query
  })
}

// 查询出库单明细详细
export function getOrder(id) {
  return request({
    url: '/inOutStock/outStockDetailOrder/' + id,
    method: 'get'
  })
}

// 新增出库单明细
export function addOrder(data) {
  return request({
    url: '/inOutStock/outStockDetailOrder',
    method: 'post',
    data: data
  })
}

// 修改出库单明细
export function updateOrder(data) {
  return request({
    url: '/inOutStock/outStockDetailOrder',
    method: 'put',
    data: data
  })
}

// 删除出库单明细
export function delOrder(id) {
  return request({
    url: '/inOutStock/outStockDetailOrder/' + id,
    method: 'delete'
  })
}

// 分配码货员
export function distributePickerTask(data) {
  return request({
    url: '/inOutStock/outStockDetailOrder/distributePickerTask',
    method: 'put',
    data: data
  })
}

// 查询拣货单
export function pickerTaskOrderByOutOrderId(id) {
  return request({
    url: '/inOutStock/pickerTaskOrder/listByOutOrderId/' + id,
    method: 'get',
    // params: query
  })
}

// 删除拣货单
export function delPickerTaskOrder(id) {
  return request({
    url: '/inOutStock/pickerTaskOrder/' + id,
    method: 'delete'
  })
}

// 查询拣货记录列表
export function pickingRecordList(query) {
  return request({
    url: '/inOutStock/pickingRecord/list',
    method: 'get',
    params: query
  })
}

// 查询码货记录列表
export function yardageGoodsRecord(query) {
  return request({
    url: '/inOutStock/yardageGoodsRecord/list',
    method: 'get',
    params: query
  })
}

// 确认分配
export function checkPicker(id) {
  return request({
    url: '/inOutStock/outStockDetailOrder/confirmDistribute/' + id,
    method: 'put',
  })
}

// 查询库区对应拣货员
export function getStorehouseAreaPicker(query) {
  return request({
    url: '/business/picker/list',
    method: 'get',
    params: query
  })
}
